package liuyang.bigeventserver.modules.security.vo;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * @author xconf
 * @since 2024/3/2
 */
public class SysUserDetails extends User {

    // 没错，就是为了增加这个字段
    private Long userid;

    public Long getUserid() {
        return userid;
    }

    public void setUserid(Long userid) {
        this.userid = userid;
    }

    public SysUserDetails(Long userid, String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username,password, authorities);
        this.userid = userid;
    }

    public SysUserDetails(Long userid, String username, String password, boolean enabled, boolean accountNonExpired,
                          boolean credentialsNonExpired, boolean accountNonLocked,
                          Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
        this.userid = userid;
    }
}
